import React from 'react';
import { FixedSizeList as List } from 'react-window';

interface VScrollProps {
  children: React.ReactNode;
}
export const NVScroll: React.FC<VScrollProps> = React.memo(() => {
  const Row = ({ index }: any) => <div className={index % 2 ? 'ListItemOdd' : 'ListItemEven'}>Row {index}</div>;
  {
    return (
      <>
        {({ height, width }: any) => (
          <List className="List" height={height} itemCount={1000} itemSize={35} width={width}>
            {Row}
          </List>
        )}
      </>
    );
  }
});
